<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title><%= title %> - Microblog</title>
    <link rel='stylesheet' href='/stylesheets/bootstrap.css' />
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
    </style>
    <link href="/stylesheets/bootstrap-responsive.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="/javascripts/html5.js" type='text/javascript'></script>
    <![endif]-->
</head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="/">Microblog</a>
            <div class="nav-collapse">
                <ul class="nav">
                    <li class="active"><a href="/">首页</a></li>
                    <% if (!user) { %>
                    <li><a href="/login">登录</a></li>
                    <li><a href="/reg">注册</a></li>
                    <% } else { %>
                    <li><a href='javascript:;'>欢迎您,<%= user.name%></a></li>
                    <li><a href="/u/userDetail/<%user.id%>">个人资料</a> </li>
                    <li><a href="/logout">退出</a></li>
                    <% } %>
                </ul>
            </div>
        </div>
    </div>
</div>

<div id="container" class="container">
    <% if (success) { %>
    <div id="alert" class="alert alert-success" action="">
        <%= success %>
    </div>
    <% } %>
    <% if (error) { %>
    <div id="alert" class="alert alert-error">
        <%= error %>
    </div>
    <% } %>
    <%- body %>
    <hr />
    <footer>
        <p><a href="javascript:;">Meteoric</a> 2012</p>
    </footer>
</div>
</body>
<script src="/javascripts/jquery.js"></script>
<script src="/javascripts/bootstrap.js"></script>
</html>
